<template>
    <div class="start-container">
      <div class="start-box">
        <h1>欢迎来到netty聊天系统</h1>
        <p class="slogan">与你的朋友随时随地畅聊</p>
        <button @click="goToLogin">进入登录</button>
        <p class="footer">© 2025 netty聊天系统</p>
      </div>
    </div>
  </template>
  
  <script setup>
  import { useRouter } from 'vue-router'
  
  const router = useRouter()
  
  function goToLogin() {
    router.push('/login')
  }
  </script>
  
  <style scoped>
  /* 设置start-container使其占据整个页面 */
  .start-container {
    height: 100vh;
    width: 100vw; /* 确保宽度为100% */
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #11998e, #38ef7d); /* 使用你提供的渐变背景 */
    position: absolute; /* 确保背景覆盖整个页面 */
    top: 0;
    left: 0;
  }
  
  .start-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://via.placeholder.com/1500x1000.png?text=Background');
    background-position: center;
    background-size: cover;
    filter: blur(10px); /* 背景模糊 */
    z-index: -1;
  }
  
  /* 设置start-box的样式，使其居中 */
  .start-box {
    background-color: rgba(0, 0, 0, 0.7); /* 更深的半透明黑色 */
    padding: 60px 80px;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: white;
    width: 400px; /* 增加宽度 */
    transition: transform 0.3s ease;
  }
  
  .start-box:hover {
    transform: scale(1.05); /* 放大效果 */
  }
  
  .start-box h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: bold;
  }
  
  .slogan {
    font-size: 18px;
    margin-bottom: 30px;
    color: #d5fbe3;
  }
  
  button {
    padding: 12px 30px;
    background-color: #66bb6a;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  button:hover {
    background-color: #81c784;
    transform: scale(1.1); /* 按钮放大效果 */
  }
  
  .footer {
    font-size: 14px;
    margin-top: 30px;
    color: #d5fbe3;
    opacity: 0.7;
    font-style: italic;
  }
  </style>
  
  